package chixing.day17.reflect;

public class Factory {
    public static Car getCar(String carName)
    {
        Car car = null;
        if(carName.equals("tesila"))
        {
            car = new tesilaCar();
        }
        else if(carName.equals("XIaomi"))
        {
            car = new XIaomiCar();
        }
        return car;
    }
}
